package com.sinosoft.vaccinetoai.server.business.login.controller;

import javax.validation.Valid;

import com.sinosoft.vaccinetoai.server.business.login.io.LoginIO;
import com.sinosoft.vaccinetoai.server.business.login.io.SSOLoginIO;
import com.sinosoft.vaccinetoai.server.business.login.service.ILoginService;
import com.sinosoft.vaccinetoai.server.business.login.vo.LoginVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;



/**
 * @ClassName: LoginController
 * @ClassNameExplain: 
 * @Description: 用户登录接口
 * @author xzh
 * @date 2025年06月24日 09:02
 */
@RestController("LoginController")
@RequestMapping("user")
public class LoginController {
	
	@Autowired
	@Qualifier("LoginService")
	ILoginService loginService;
	
	/**
	 * @Title: login
	 * @TitleExplain: 
	 * @Description: 用户登录接口方法
	 * @param loginIO 入参
	 * @return LoginVO 返参
	 * @version 1.0.3
	 * @author xzh
	 */
	@PostMapping("/login")
	public LoginVO login(@Valid @RequestBody SSOLoginIO loginIO) throws Exception {
		return loginService.ssoLogin(loginIO);
	}
	
}
